package com.ruoyi.business.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;

@Mapper
public interface DashboardMapper {
    // 合作商相关统计
    BigDecimal sumPartnerIncomeToday(@Param("partnerId") Long partnerId);
    BigDecimal sumPartnerIncomeTotal(@Param("partnerId") Long partnerId);
    Integer countPartnerDevices(@Param("partnerId") Long partnerId);
    Integer countPartnerOnlineDevices(@Param("partnerId") Long partnerId);

    // 经销商相关统计
    BigDecimal sumDistributorSalesToday(@Param("distributorId") Long distributorId);
    BigDecimal sumDistributorIncomeTotal(@Param("distributorId") Long distributorId);
    Integer countDistributorPartners(@Param("distributorId") Long distributorId);
    Integer countDistributorDevices(@Param("distributorId") Long distributorId);
}